Skip to main content

getProperty

Returns a property of the CDocBuilderValue object.

Please note, that for the .docbuilder file the CDocBuilderValue.getProperty method is not used.

Syntax

CDocBuilderValue getProperty(String name);

Parameters

ParameterTypeDescription
nameStringThe name of the CDocBuilderValue object property.

Example

Java

CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
CDocBuilderValue api = global.get("Api");
CDocBuilderValue document = api.call("GetDocument");
CDocBuilderValue docPr = document.getProperty("color");
CDocBuilder.dispose();

There are two more ways to get a property of the CDocBuilderValue object:

  1. use the get method that takes an argument in the string format:

    CDocBuilderValue get(String name);

    Example

    Java

    CDocBuilder.initialize("");
    CDocBuilder builder = new CDocBuilder();
    CDocBuilderContext context = builder.getContext();
    CDocBuilderValue global = context.getGlobal();
    CDocBuilderValue api = global.get("Api");
    CDocBuilderValue document = api.call("GetDocument");
    CDocBuilderValue docPr = document.get("color");
    CDocBuilder.dispose();
  2. use the default[] postfix expression that takes an argument in the string format:

    property CDocBuilderValue default[String]

    Example

    Java

    CDocBuilder.initialize("");
    CDocBuilder builder = new CDocBuilder();
    CDocBuilderContext context = builder.getContext();
    CDocBuilderValue global = context.getGlobal();
    CDocBuilderValue api = global.get("Api");
    CDocBuilderValue document = api.call("GetDocument");
    CDocBuilderValue docPr = document["color"];
    CDocBuilder.dispose();